<template>
  <section>
    <h2 v-show="tocom.length === 0">暂无数据</h2>
    <h2>已经完成<span>{{ ComNum }}</span></h2>
    <ul>
      <li v-for="item, index in tocom" :key="index" v-show="item.checked">
        <input type="checkbox" v-model="item.checked" />
        <p>{{ item.title }}</p>
        <a href="javascript:;" @click="del(index)">-</a>
      </li>
    </ul>
  </section>
</template>

<script>
export default {
  props: ['tocom', 'ComNum'],
  setup(props, context) {
    function del(index) {
      context.emit('toParentDel', index)
    }
    return {
      del
    }
  }
}
</script>

<style></style>
